﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WI.CandidateManager.Common.Data.Enums;
using WI.CandidateManager.Common.Data.Properties;

namespace WI.CandidateManager.Common.Data.Entities
{
    [MetadataType(typeof(UserBaseMeta))]
    public partial class UserBase
    {
    }

    public class UserBaseMeta
    {
        [Required(ErrorMessageResourceName = "RequiredLogin", ErrorMessageResourceType = typeof(Resources))]
        public string Login { get; set; }

        [Required(ErrorMessageResourceName = "RequiredPassword", ErrorMessageResourceType = typeof(Resources))]
        public string Password { get; set; }

        [Required(ErrorMessageResourceName = "RequiredFullName", ErrorMessageResourceType = typeof(Resources))]
        public string FullName { get; set; }

        [Required(ErrorMessageResourceName = "RequiredShortName", ErrorMessageResourceType = typeof(Resources))]
        public string ShortName { get; set; }

        [Required(ErrorMessageResourceName = "RequiredEmail", ErrorMessageResourceType = typeof(Resources))]
        public string Email { get; set; }

        [Required(ErrorMessageResourceName = "RequiredPhone", ErrorMessageResourceType = typeof(Resources))]
        public string Phone { get; set; }

        [Required]
        public System.DateTime RegisterDate { get; set; }

        [Required(ErrorMessageResourceName = "RequiredGender", ErrorMessageResourceType = typeof(Resources))]
        public Gender Gender { get; set; }

        [Required]
        public UserRole Role { get; set; }
    }
}
